
<form method="post" action="/oss/?r=noticeTemplet/doEdit">
    <{include file='../common_params.tpl'}>
    <input type="hidden" name="id" value="<{$info.id}>" />

    <div class="box box-black">
        <div class="box-body">
            <table class="table table-bordered">
                <colgroup>
                    <col style="width: 20%;"></col>
                    <col style="width: 80%;"></col>
                </colgroup>
                <tr>
                    <th class="th-label">模板名称</th>
                    <td>
                        <input type="text" name="name" id="name" class="form-control inline" placeholder="" value="<{$info.name}>"/>
                    </td>
                </tr>
                
                <tr>
                    <th class="th-label">公告标题</th>
                    <td>
                        <input type="text" name="title" id="title" class="form-control inline" placeholder="" value="<{$info.title}>" />
                    </td>
                </tr>
                
                <tr>
                    <th class="th-label">公告内容</th>
                    <td><textarea class="form-control" name="content" rows="10"><{$info.content}></textarea></td>
                </tr>
               
            </table>
        </div>

        <div class="box-footer">
            <a href="javascript:history.go(-1);" class="btn btn-default">返回</a>
            <button type="submit" name="sub" class="btn btn-default pull-right">保存</button>
        </div>
    </div>
</form>

<script>
    $(function(){
        $('button[name="sub"]').click(function(){
        	var name = $("#name").val();
        	if(name == ''){
        		layer.alert('请填写模板名称', {icon: 2, skin: 'layui-layer-molv'});
            	return false;
        	}
        	
        	var title = $("#title").val();
        	if(title == ''){
        		layer.alert('请填写公告标题', {icon: 2, skin: 'layui-layer-molv'});
            	return false;
        	}
        });
        
    });
</script>
